<!DOCTYPE>
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<title>吃啥</title>
</head>

<link href="/image/style-food.css" type=text/css rel=stylesheet>
<script language="javascript" type="text/javascript"  src="/image/jquery.js"></script> 
<script src="/image/food/common-food.js"></script>
<script src="/image/jqueryprogressbar.js"></script>
<body>	
<div class="container">
 <div class="mbody">
   <div class="mlogo">
        <a href="#"><img src="/image/food/chisha_logo.gif"/></a>
   </div>
   <div class="mhead">    
     <div class="mnav"> 
       <a class="a-first" href="#">首页</a>
       <a href="#">私人频道</a>
	   <a href="#">晒食园</a>
       <a href="#">食谱</a>           
       <a href="#">食百问</a>
	   <a href="#">菜园子</a>
       <a href="#">食膳名师</a>
    </div>
  </div> 
  <div class="content-radius"></div>
  <div class="content">   	  
      <div class="left content-left">
 	  	  <div class="foodshow border-dotted">
	            <div class="foodshow-head bg-highlight">
                	<h1>今天是<?=$curdate?>,农历<?=$ldate[0]?>年<?=$ldate[1]?><?=$ldate[2]?>。今日<?=$city?>天气比较闷热，推荐[<?=$top[subject]?>]，消暑哦！</h1> 
                </div>
          		<div class="foodshow-content">
                	<div class="left">
                        <ul>
                        	
                            <li><a href="#">今日推荐</a></li>
                            <li><a href="#">明星菜品</a></li>
                            <li><a href="#">专家推荐</a></li>                  
                            <li><a href="#">私家推荐</a></li>                   
                        </ul>
                    </div>
                    <div class="left border-green">
                    	<div class="imgs">
                    		<a href="/food/foodcontent?menu_id=<?=$top[menu_id]?>" target="_blank"><img src="/image/food/food<?=$top[menu_id]?>.jpg" width="500px" height="350px"/></a>
                    		<!--  
                        	<div class="left img1"><a href=""><img src="/image/food/food6.jpg"/></a></div>
                            <div class="left img2"><a href=""><img src="/image/food/food8.jpg"/></a></div>
                            <div class="left img3"><a href=""><img src="/image/food/food7.jpg"/></a></div>
                        	-->
                        </div> 
                        <div class="foodshow-content-tip select-short right">                        	
                            <form>
			                  <select name=""><option selected>年龄</option></select>
            			      <select name=""><option selected>性别</option></select>
			                  <input type="submit" value="确认" class="button-little"/>     
            				</form>
                        </div>
                    </div>
                </div>
          </div>
          <div class="foodshow-list">
          	 <ul>
          	 	<? if(empty($lists) || count($lists)==0){?>
	          	 	<li>
	                	<p class="border-solid"><a href=""><img src="/image/food/default.jpg"/></a></p>
	                    <h4>没有您合适的菜谱</h4>
	                </li>
          	 	<? }else{?>
	          	 	<? foreach($lists as $list){?>
	             	<li>
	                	<p class="border-solid"><a href="/food/foodcontent?menu_id=<?=$list[menu_id]?>" target="_blank"><img src="/image/food/food<?=$list[menu_id]?>.jpg"/></a></p>
	                    <h4><a href=""><?=$list[subject]?></a></h4>
	                </li>
	               <?}?>
               <?}?>
             </ul>            
          </div>          
      </div>
      <div class="left content-right">
	      <div class="tips box">
          	<div class="box-header bg-highlight">
            	小贴士
            </div>
            <p><?=$tips ?></p>
          </div>
          <div class="box">
          	<div class="box-header bg-highlight">
            	用户中心
            </div>
            <div class="box-content">
            <? if(intval(Cookie::get('food_user_id')) == 0){ ?>
              <form method="post" action="/food/login">
              	<ul class="input-info-little">
                  <li ><span>邮箱：</span> <span><input name="username" type="text" /></span></li>
                  <li><span>密码：</span> <span><input name="password" type="text" /></span> </li>
                  <li><span></span> <span><input name="" type="checkbox" value="">记住我</span> </li>
                  <li class="last-desc"><span></span> <span><input type="submit" value="登录" class="button-little"/></span></li>  
                </ul>
              </form>
              <?  }else{ ?>
              
              <form method="post" action="/food/logout">
              	<ul class="input-info-little">
                  <li><span><?=Cookie::get('food_user_name') ?> 您好</span><span><input type="submit" value="注销" class="button-little"/></span></li>
                </ul>
                </form>
              
              <?  } ?>
            </div>
          </div>
          <div class="box">
          	<div class="box-header bg-highlight">
            	排行榜
            </div>
            <div class="box-content">
              	<table class="two-cols img-little p-little">
              		<? foreach($ranks as $rank){?>
              			 <tr><td><img src="/image/food/food<?=$rank[menu_id]?>.jpg"/></td><td><p><?=$rank[subject]?></p><p class="p-last">5 推荐 | 10 品尝</p></td></tr>
              		<?}?>
                </table>
            </div>
          </div>
          <div class="box">
          	<div class="box-header bg-highlight">
            	进一步推荐
            </div>            
            <div class="box-content select-short">
              <form action="/food/index" method="post">
              	  <input type="text" name="age" value="年龄"/>
                  <select name="sex"><option selected value="0">性别</option><option value="1">男</option><option value="2">女</option></select>
                  <input type="submit" value="确认" class="button-little"/>     
              </form>
            </div>          	
          </div>
          <div class="box">
          	<div class="box-header bg-highlight">
            	搜索
            </div>            
            <div class="box-content">
              <form action="/food/index" method="post">
              	  <input type="text" name="keyword" value="关键词" onfocus="this.value=''"/>
              	   <input type="submit" value="搜索" class="button-little"/>
              </form>
            </div>          	
          </div>
          
            <div class="box">
          	<div class="box-header bg-highlight">
            	最新评论
            </div>            
            <div class="box-content">
               <ul>
          	 	<? if(empty($comments) || count($comments)==0){?>
	          	 	<li>
					还没有评论
	                </li>
          	 	<? }else{?>
	          	 	<? foreach($comments as $comment){?>
	             	<li>
	                	<p><? if(strlen($comment['message']) > 14){ echo substr($comment['message'], 14); }else{ echo $comment['message']; } ?></p>
	                	<p><?=$comment['user_name']?> 发表于 <?=date('m-d H:m:s',$comment['mktime']) ?></p>
	                	
	                </li>
	               <?}?>
               <?}?>
             </ul>            
            </div>          	
          </div>
      </div>
  </div>
 </div>	
</div>
</body>
</html>
